package com.whales.lms.rms.web.controller;

import java.util.List;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.whales.lms.rms.web.model.ScheduleVO;
import com.whales.lms.rms.web.service.ScheduleService;
import com.whales.shared.controller.GenericController;

@Controller
@RequestMapping("/schedule/*")
public class ScheduleController extends GenericController<ScheduleVO, ScheduleVO, ScheduleService> {
	@RequestMapping
	public @ResponseBody void createReg(ScheduleVO scheduleVO) throws Exception{
		service.createReg(scheduleVO.getScheduleVOs());
	}
	
	@RequestMapping
	public @ResponseBody void createTemp(ScheduleVO scheduleVO) throws Exception{
		service.createTemp(scheduleVO.getScheduleVOs());
	}
	
	@RequestMapping
	public @ResponseBody void deleteTempByIds(ScheduleVO scheduleVO) throws Exception{
		service.deleteTempById(scheduleVO.getScheduleVOs());
	}
	
	@RequestMapping
	public @ResponseBody List<ScheduleVO> getRegList(ScheduleVO scheduleVO) throws Exception{
		return service.getRegList(scheduleVO);
	}
	
	@RequestMapping
	public @ResponseBody List<ScheduleVO> getTempList(ScheduleVO scheduleVO) throws Exception{
		return service.getTempList(scheduleVO);
	}
	
	@RequestMapping
	public @ResponseBody List<ScheduleVO> getZoneList(ScheduleVO scheduleVO) throws Exception{
		return service.getZoneList(scheduleVO);
	}
	
	@RequestMapping
	public @ResponseBody List<ScheduleVO> getZonePcList(ScheduleVO scheduleVO) throws Exception{
		return service.getZonePcList(scheduleVO);
	}
	
	@RequestMapping
	public @ResponseBody void updateReg(ScheduleVO scheduleVO) throws Exception{
		service.createReg(scheduleVO.getScheduleVOs());
	}
	
	@RequestMapping
	public @ResponseBody void updateZone(ScheduleVO scheduleVO) throws Exception{
		service.updateZone(scheduleVO.getScheduleVOs());
	}
	
	@RequestMapping
	public @ResponseBody void updateZonePc(ScheduleVO scheduleVO) throws Exception{
		service.updateZonePc(scheduleVO.getScheduleVOs());
	}
}
